import { createRouter, createWebHashHistory } from "vue-router";
import routesList from "./routers";

const routes = routesList;

const router = createRouter({
    history: createWebHashHistory(), // history 模式则使用 createWebHistory()
    routes,
});


// router.beforeEach((to, from, next) => {
//     const userStore = useUserStore();
//     const { appScene } = storeToRefs(userStore);
//     if (to.path.includes('board')) {
//         appScene.value = 'board'
//     } else {
//         appScene.value = 'monitor'
//         Cookies.set('HC-BOARD-ACTIVE-NAV', '0-0-0')
//     }
//     next();
// });
export default router;
